package com.example.testspringes.modul;

/**
 * @Description: //TODO
 * @ProjectName: testspringes
 * @Package: com.example.testspringes.modul
 * @Author: FX
 * @CreateDate: 2018/12/12 10:28
 * @Version: 1.0
 * Copyright: Copyright (c) 2018
 */
public class Result<T> {
 private int code;
 private String message;
 private T data;

    public Result() {
        this.code = 200;
        this.message = "success";
    }

    public Result(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }
    public Result( T data) {
        this.code = 200;
        this.message = "success";
        this.data = data;
    }
    public static <T>Result<T> succ(){
       return new Result<>();
    }
    public static <T>Result<T> succ(T data){
        return new Result<>(data);
    }

}
